#include <iostream>
#include <fstream>
#include <algorithm>
using namespace std;
const int maxn = 505;
struct NODE
{
    double price, dis;
};
bool cmp(NODE &n1, NODE &n2)
{
    return n1.dis < n2.dis;
}
int main()
{
    // freopen("case.txt", "r", stdin);
    double cmax, d, davg;
    int i, n;
    NODE node[maxn];
    scanf("%lf %lf %lf %d", &cmax, &d, &davg, &n);
    for (i = 0; i < n; i++)
    {
        scanf("%lf %lf", &node[i].price, &node[i].dis);
    }
    node[n] = {0.0, d};
    sort(node, node + n + 1, cmp);
    if (node[0].dis != 0)
    {
        printf("The maximum travel distance = %.2f", 0.0);
        return 0;
    }

    int nowdis = 0, maxdis = 0, leftdis = 0;
    double totalPrice = 0, nowprice = node[0].price;
    i = 1;
    while (nowdis < d)
    {
        double min = 10000000;
        int flag = 0, td;
        maxdis = nowdis + cmax * davg;
        if (maxdis < node[i].dis)
        {
            printf("The maximum travel distance = %.2f", maxdis + 0.0);
            return 0;
        }
        //可以到达的更低价格的加油站
        for (; node[i].dis <= maxdis; i++)
        {
            if (node[i].price < nowprice)
            {
                flag = 1;
                break;
            }
            if (min > node[i].price)
            {
                min = node[i].price;
                td = i;
            }
        }

        if (flag)
        {
            //行驶距离内有更便宜的加油站,行驶距离是当前加油站到下一加油站的距离
            flag = 0;
            totalPrice += (node[i].dis - nowdis - leftdis) * nowprice / davg;
            leftdis = 0;
        }
        else
        {
            //行驶距离内没有更便宜的加油站，行驶距离是最远距离
            i = td;
            totalPrice += (cmax * davg - leftdis) * nowprice / davg;
            leftdis = maxdis - node[i].dis;
        }
        nowdis = node[i].dis;
        nowprice = node[i].price;
        i++;
    }
    printf("%.2f", totalPrice);
    return 0;
}